import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:wanAndroid/page/page_splash.dart';
import 'package:wanAndroid/res/colors.dart';

void main() async {
  runApp(App());
}

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) => MaterialApp(
        title: "玩安卓",
        home: PageSplash(),
        localizationsDelegates: [
          RefreshLocalizations.delegate,
          GlobalMaterialLocalizations.delegate, // 指定本地化的字符串和一些其他的值
          GlobalCupertinoLocalizations.delegate, // 对应的Cupertino风格
          GlobalWidgetsLocalizations.delegate // 指定默认的文本排列方向, 由左到右或由右到左
        ],
        supportedLocales: [
          Locale("en"),
          Locale("zh"),
        ],

        ///主题
        theme: ThemeData(
          primaryColor: ResColors.primaryColor,
        ),
        locale: const Locale('zh'),
      );
}
